import { Controller, Get, Req } from '@nestjs/common';
import { successReturn } from 'src/utils';
import { UserWalletService } from './user-wallet.service';

@Controller('userWallet')
export class UserWalletController {
    constructor(
        private userWalletService:UserWalletService
    ){}

    @Get('wallet')
    async wallet(@Req() {userId}) {
        const wallet = await this.userWalletService.wallet(userId)
        return successReturn(wallet)
    }
}
